package demo.game.chess.common;

import java.io.Serializable;

public class Position implements Serializable {

	int row;
	int column;

	public Position() {

	}

	public Position(final int row, final int column) {
		super();
		this.row = row;
		this.column = column;
	}

	@Override
	public boolean equals(final Object other) {
		if (!(other instanceof ChessCell)) {
			return false;
		}
		ChessCell p = (ChessCell) other;
		return this.row == p.getRow() && this.column == p.getColumn();
	}

	public int getColumn() {
		return this.column;
	}

	public int getRow() {
		return this.row;
	}

	@Override
	public int hashCode() {
		return this.row * 10 + this.column;
	}

	@Override
	public String toString() {
		return "(" + this.row + "," + this.column + ")";
	}

}
